home *** CD-ROM | disk | FTP | other *** search
/ Grapevine 20 / Grapevine 20 (Disk 1 of 2).adf / Files / arexxexamps.lha / ARTICLES / AREXX_EXAMPLES / Example14.rexx < prev    next >
OS/2 REXX Batch file  |  1980-01-07  |  921b  |  45 lines

  1. /* Example 14 */
  2.  
  3. CR = '0A'x               /* CR = Carriage Return */
  4. FF = '0C'x               /* FF =  FormFeed (Clear Screen) */
  5. ClearScreen = FF || CR   /* || = concatenate : means Join together */
  6.  
  7. Do Forever
  8.     Say ClearScreen
  9.  
  10.     Say " (A) - Archive"
  11.     Say " (B) - Batch"
  12.     Say " (C) - Catch"
  13.     Say ""
  14.     Say " (X) - Exit"
  15.     Say ""
  16.  
  17.     Options Prompt "Enter Choice : "; pull choice 2
  18.  
  19.     Choice = Upper(Chocie)
  20.  
  21.     If Choice = "X" Then Do     /* This is where we Quit */
  22.        Say "Exiting..."
  23.        Exit
  24.     End
  25.     Else If Choice = "A" Then Do
  26.        Say "Archive"
  27.        Call WaitForCR()
  28.     End
  29.     Else If Choice = "B" Then Do
  30.        Say "Batch"
  31.        Call WaitForCR()
  32.     End
  33.     Else If Choice = "C" Then Do
  34.        Say "Catch"
  35.        Call WaitForCR()
  36.     End
  37. End
  38.  
  39. WaitForCR(): Procedure
  40.     Say ""
  41.     Options Prompt "Return to Continue"
  42.     Do Until C==""
  43.        Parse Pull c
  44.     End
  45. Return